/**
 * 
 */
package br.ufrgs.inf.cwsmart.impl.description;

import br.ufrgs.inf.cwsmart.description.CWSDescription;
import br.ufrgs.inf.cwsmart.description.Description;
import br.ufrgs.inf.cwsmart.exception.FrameworkException;

/**
 * @author Rodrigo S Lumertz
 *
 */
public class DescriptionImpl extends Description {

	/* (non-Javadoc)
	 * @see br.ufrgs.inf.cwsmart.description.Description#instantiate(byte[], java.lang.String)
	 */
	@Override
	public CWSDescription instantiate(String cwsPath, String language, String... wsdlPaths) 
		throws FrameworkException {
		
		CWSDescription CWSInstance = null;
		
		if (language.equalsIgnoreCase("bpel")) {
			CWSInstance = new BPELDescription(cwsPath, language, wsdlPaths);
		}
		else {
			throw new FrameworkException(FrameworkException.ErrorCode.LANGUAGE_NOT_SUPPORTED);
		}
				
		return CWSInstance;
	}

}
